package com.elecemp.front.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 系统入口管理
 * 
 * @author Roderick
 *
 */
@Controller
public class LoginController {

	/**
	 * 访问登录页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public String loginPage() {
		// 先判断session是否过期，过期则返回登录页面
		return "front/login";
		// 否则返回主页
	}

	/**
	 * 访问主页
	 * 
	 * @return
	 */
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String index() {
		return "index";
	}

	/**
	 * 跳转访问权限不足提示页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/access_error", method = RequestMethod.GET)
	public String accessError() {
		return "front/error/access";
	}
}
